package com.itheima.d14_extends_constructor;

public class Teacher extends People {
    private String skill;
     //子类有参构造
    public Teacher(String name,String skill){

        super(name);
        System.out.println("子类构造器");

        this.skill=skill;
    }

    public String getSkill() {

        return skill;
    }

    public void setSkill(String skill) {

        this.skill = skill;
    }

    @Override
    public String toString() {
        return getName()+getSkill();
    }
}
